home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 6.1 KB | 164 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWAScrol.cpp
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
- // We separate the archiving functions into their own translation units in order to
- // enable dead-stripping.
-
- #include "FWFrameW.hpp"
-
- #ifndef FWSCROLR_H
- #include "FWScrolr.h"
- #endif
-
- //========================================================================================
- // File scope definitions
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- #pragma segment FW_FrameSegment
- #endif
-
- //========================================================================================
- // CLASS FW_CPrivBaseScroller
- //========================================================================================
-
- const FW_ClassTypeConstant FW_LPrivBaseScroller = FW_TYPE_CONSTANT('b','s','c','l');
- FW_REGISTER_ARCHIVABLE_CLASS(FW_LPrivBaseScroller, FW_CPrivBaseScroller, FW_CPrivBaseScroller::Create, FW_CPrivBaseScroller::Read, FW_CPrivBaseScroller::Destroy, FW_CPrivBaseScroller::Write)
-
- //----------------------------------------------------------------------------------------
- // FW_CPrivBaseScroller::Create
- //----------------------------------------------------------------------------------------
-
- void* FW_CPrivBaseScroller::Create(FW_CReadableStream& stream, FW_ClassTypeConstant type)
- {
- FW_UNUSED(stream);
- FW_UNUSED(type);
- FW_DEBUG_MESSAGE("FW_CPrivBaseScroller is an abstract base class");
- return NULL;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CPrivBaseScroller::Destroy
- //----------------------------------------------------------------------------------------
-
- void FW_CPrivBaseScroller::Destroy(void* object, FW_ClassTypeConstant type)
- {
- FW_UNUSED(type);
- FW_UNUSED(object);
- FW_DEBUG_MESSAGE("FW_CPrivBaseScroller is an abstract base class");
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CPrivBaseScroller::Read
- //----------------------------------------------------------------------------------------
-
- void FW_CPrivBaseScroller::Read(FW_CReadableStream& stream, FW_ClassTypeConstant type, void* object)
- {
- FW_UNUSED(type);
- FW_UNUSED(stream);
- FW_UNUSED(object);
- FW_DEBUG_MESSAGE("FW_CPrivBaseScroller is an abstract base class");
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CPrivBaseScroller::Write
- //----------------------------------------------------------------------------------------
-
- void FW_CPrivBaseScroller::Write(FW_CWritableStream& stream, FW_ClassTypeConstant type, const void *object)
- {
- FW_UNUSED(type);
- FW_UNUSED(stream);
- FW_UNUSED(object);
- FW_DEBUG_MESSAGE("FW_CPrivBaseScroller is an abstract base class");
- }
-
- //========================================================================================
- // CLASS FW_CScroller
- //========================================================================================
-
- const FW_ClassTypeConstant FW_LScroller = FW_TYPE_CONSTANT('s','c','l','r');
- FW_REGISTER_ARCHIVABLE_CLASS(FW_LScroller, FW_CScroller, FW_CScroller::Create, FW_CScroller::Read, FW_CScroller::Destroy, FW_CScroller::Write)
-
- //----------------------------------------------------------------------------------------
- // FW_CScroller::Create
- //----------------------------------------------------------------------------------------
-
- void* FW_CScroller::Create(FW_CReadableStream& stream, FW_ClassTypeConstant type)
- {
- FW_UNUSED(stream);
- FW_UNUSED(type);
- FW_SOMEnvironment ev;
- return FW_NEW(FW_CScroller, (ev));
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CScroller::Destroy
- //----------------------------------------------------------------------------------------
-
- void FW_CScroller::Destroy(void* object, FW_ClassTypeConstant type)
- {
- FW_UNUSED(type);
- FW_CScroller* self = (FW_CScroller*) object;
- delete self;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CScroller::Read
- //----------------------------------------------------------------------------------------
-
- void FW_CScroller::Read(FW_CReadableStream& stream, FW_ClassTypeConstant type, void* object)
- {
- FW_UNUSED(type);
- FW_SOMEnvironment ev;
- ((FW_CScroller *) object)->InitializeFromStream(ev, stream);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CScroller::Write
- //----------------------------------------------------------------------------------------
-
- void FW_CScroller::Write(FW_CWritableStream& stream, FW_ClassTypeConstant type, const void *object)
- {
- FW_UNUSED(type);
- FW_SOMEnvironment ev;
- ((const FW_CScroller *) object)->Flatten(ev, stream);
- }
-
-
- //========================================================================================
- // CLASS FW_CScrollBarScroller
- //========================================================================================
-
- const FW_ClassTypeConstant FW_LScrollBarScroller = FW_TYPE_CONSTANT('s','b','s','c');
- FW_REGISTER_ARCHIVABLE_CLASS(FW_LScrollBarScroller, FW_CScrollBarScroller, FW_CScrollBarScroller::Create, FW_CScroller::Read, FW_CScrollBarScroller::Destroy, FW_CScroller::Write)
-
- //----------------------------------------------------------------------------------------
- // FW_CScrollBarScroller::Create
- //----------------------------------------------------------------------------------------
-
- void* FW_CScrollBarScroller::Create(FW_CReadableStream& stream, FW_ClassTypeConstant type)
- {
- FW_UNUSED(stream);
- FW_UNUSED(type);
- FW_SOMEnvironment ev;
- return FW_NEW(FW_CScrollBarScroller, (ev));
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CScrollBarScroller::Destroy
- //----------------------------------------------------------------------------------------
-
- void FW_CScrollBarScroller::Destroy(void* object, FW_ClassTypeConstant type)
- {
- FW_UNUSED(type);
- FW_CScrollBarScroller* self = (FW_CScrollBarScroller*) object;
- delete self;
- }
-
-
-